package com.bustamante.paratienda;
import java.util.*;

public class Catalogo{
    private LinkedList catalogo = new LinkedList();

    public void addArticulo(String id, String nombre, double precio,String cantidad){
        Articulos art = new Articulos(id,nombre,precio,cantidad);
        catalogo.add(art);
    }
    
    public Articulos getArticulo(int i){
        return (Articulos)catalogo.get(i);
    }
    
    public int getSizee(){
        return catalogo.size();
    }
    
    public void sort(){
        Collections.sort(catalogo);
    }
    public LinkedList<Articulos> getCatalogo(){
        LinkedList<Articulos> copia = new LinkedList<Articulos>();
        Articulos art = new Articulos("001", "ZAPATILLAS", 1 ,"150");
        copia.add(art);
        Articulos art2 = new Articulos("002", "POLO", 2,"200");
        copia.add(art2);
        Articulos art3 = new Articulos("003", "CASACA", 3,"100");
        copia.add(art3);
        Articulos art4 = new Articulos("004", "CAMISA", 4,"900");
        copia.add(art4);
        
        return copia;
    }

    public void setCatalogo(LinkedList catalogo) {
        this.catalogo = catalogo;
    }
}